<a name="commentform"></a>
<div class="debate_form">
  <%= form_for [@commentable, Comment.new] do |f| %>

    <!-- move this to partial _alert.html.erb -->
    <p id="notice"><%= alert %><%= notice %></p>
    <!-- -->

    <% unless user_signed_in? %>
	    <div class="field" id="debate_author">
	      <%= f.label t("author") %><br />
	      <%= f.text_field :author %>
	    </div>
	    <div class="field" id="debate_author_url">
	      <%= f.label t("author_url") %><br />
	      <%= f.text_field :author_url %>
	    </div>
	    <div class="field" id="debate_author_email">
	      <%= f.label t("author_email") %><br />
	      <%= f.text_field :author_email %>
	    </div>

    <% else %>
      <%= f.hidden_field :user_id, :value => current_user.id %>

    <% end %>


    <div class="field" id="debate_content">
      <%= f.label t("content") %><br />
      <%= f.text_area :content %>
    </div>


    <%= f.hidden_field :commentable_type, :value => model.class %>
    <%= f.hidden_field :commentable_id, :value => model.id %>
    <%= f.hidden_field :user_ip, :value => request.remote_ip %>
  	<%= f.hidden_field :user_agent, :value => request.user_agent %>

    <div class="actions">
      <%= f.submit t("create_comment") %>
    </div>
  <% end %>
</div>
